package com.tbit.uqbike.object.pojo.vo;

import com.tbit.uqbike.webmanager.util.csv.annotations.Csv;
import lombok.Data;

import java.math.BigDecimal;

@Data
public class AccountDayStatDownloadAllXuNiVO {



    /*private BigDecimal cycling_card_deduction_fee_sum;
    private BigDecimal cycling_card_deduction_fee_cnt;
    private BigDecimal bike_card_expenditure_sum;
    private BigDecimal bike_card_expenditure_cnt;


    private BigDecimal membership_card_deduction_fee_sum;
    private BigDecimal membership_card_deduction_fee_cnt;
    private BigDecimal membership_card_expenditure_sum;
    private BigDecimal membership_card_expenditure_cnt;


    private BigDecimal coupon_deduction_fee_sum;
    private BigDecimal coupon_deduction_fee_cnt;
    private BigDecimal coupon_package_expenditure_fee_sum;
    private BigDecimal coupon_package_expenditure_fee_cnt;*/
    /**
     * 总卡券抵扣
     */
    private BigDecimal credit_card_voucher_deduction_sum;
    private BigDecimal credit_card_voucher_deduction_cnt;
    /**
     * 总卡券抵扣退款
     */
    private BigDecimal credit_card_voucher_deduction_refund_sum;
    private BigDecimal credit_card_voucher_deduction_refund_cnt;


    @Csv(name = "总抵扣费用")
    private BigDecimal total_sum;
    @Csv(name = "总抵扣费用笔数")
    private BigDecimal total_cnt;
    @Csv(name = "总抵扣费用退款")
    private BigDecimal total_refund_sum;
    @Csv(name = "总抵扣费用退款笔数")
    private BigDecimal total_refund_cnt;


    @Csv(name = "卡券抵扣费用")
    private BigDecimal card_sum;
    private BigDecimal card_cnt;
    @Csv(name = "卡券抵扣费用退款")
    private BigDecimal card_refund_sum;
    private BigDecimal card_refund_cnt;


    @Csv(name = "礼品卡抵扣费用")
    private BigDecimal gift_card_deduction_sum;
    private BigDecimal gift_card_deduction_cnt;
    @Csv(name = "礼品卡抵扣费用退款")
    private BigDecimal refund_of_gift_card_deduction_fee_sum;
    private BigDecimal refund_of_gift_card_deduction_fee_cnt;


    @Csv(name = "人工修改订单抵扣费用")
    private BigDecimal manually_modify_the_order_deduction_expense_sum;
    private BigDecimal manually_modify_the_order_deduction_expense_cnt;
    @Csv(name = "人工修改订单抵扣费用退款")
    private BigDecimal manually_modify_the_order_deduction_fee_refund_sum;
    private BigDecimal manually_modify_the_order_deduction_fee_refund_cnt;


    @Csv(name = "其他虚拟抵扣费用")
    private BigDecimal other_virtual_deduction_expenses_sum;
    private BigDecimal other_virtual_deduction_expenses_cnt;
    @Csv(name = "其他虚拟抵扣费用退款")
    private BigDecimal refund_of_other_virtual_deduction_fees_sum;
    private BigDecimal refund_of_other_virtual_deduction_fees_cnt;


    public BigDecimal getCard_sum() {
        return (credit_card_voucher_deduction_sum == null ? BigDecimal.ZERO : credit_card_voucher_deduction_sum);
    }

    public BigDecimal getCard_cnt() {
        return (credit_card_voucher_deduction_cnt == null ? BigDecimal.ZERO : credit_card_voucher_deduction_cnt);
    }

    public BigDecimal getCard_refund_sum() {
        return (credit_card_voucher_deduction_refund_sum == null ? BigDecimal.ZERO : credit_card_voucher_deduction_refund_sum);
    }

    public BigDecimal getCard_refund_cnt() {
        return (credit_card_voucher_deduction_refund_cnt == null ? BigDecimal.ZERO : credit_card_voucher_deduction_refund_cnt);
    }


    public BigDecimal getTotal_sum() {
        return getCard_sum().add(gift_card_deduction_sum == null ? BigDecimal.ZERO : gift_card_deduction_sum)
                .add(manually_modify_the_order_deduction_expense_sum == null ? BigDecimal.ZERO : manually_modify_the_order_deduction_expense_sum)
                .add(other_virtual_deduction_expenses_sum == null ? BigDecimal.ZERO : other_virtual_deduction_expenses_sum);
    }

    public BigDecimal getTotal_cnt() {
        return getCard_cnt().add(gift_card_deduction_cnt == null ? BigDecimal.ZERO : gift_card_deduction_cnt)
                .add(manually_modify_the_order_deduction_expense_cnt == null ? BigDecimal.ZERO : manually_modify_the_order_deduction_expense_cnt)
                .add(other_virtual_deduction_expenses_cnt == null ? BigDecimal.ZERO : other_virtual_deduction_expenses_cnt);
    }

    public BigDecimal getTotal_refund_sum() {
        return getCard_refund_sum().add(refund_of_gift_card_deduction_fee_sum == null ? BigDecimal.ZERO : refund_of_gift_card_deduction_fee_sum)
                .add(manually_modify_the_order_deduction_fee_refund_sum == null ? BigDecimal.ZERO : manually_modify_the_order_deduction_fee_refund_sum)
                .add(refund_of_other_virtual_deduction_fees_sum == null ? BigDecimal.ZERO : refund_of_other_virtual_deduction_fees_sum);
    }

    public BigDecimal getTotal_refund_cnt() {
        return getCard_refund_cnt().add(refund_of_gift_card_deduction_fee_cnt == null ? BigDecimal.ZERO : refund_of_gift_card_deduction_fee_cnt)
                .add(manually_modify_the_order_deduction_fee_refund_cnt == null ? BigDecimal.ZERO : manually_modify_the_order_deduction_fee_refund_cnt)
                .add(refund_of_other_virtual_deduction_fees_cnt == null ? BigDecimal.ZERO : refund_of_other_virtual_deduction_fees_cnt);
    }
}
